package dk.eclipse.android.badassapp.location;

import java.util.List;

import android.app.PendingIntent;
import android.location.Criteria;
import android.location.GpsStatus;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationProvider;
import android.location.GpsStatus.Listener;
import android.location.GpsStatus.NmeaListener;
import android.os.Bundle;
import android.os.Looper;

/**
 * @author jaw
 * 
 *         Wrapper to allow single point access to network and gps location
 *         suppliers. e.g. getlastknowlocation and listeners can be set that
 *         will listen on both network and gps location updates.
 */
public interface IMyLocationManager {
	// Singleton pattern.
//	IMyLocationManager INSTANCE = new MyLocationManagerImpl();
	
	// Added
	public abstract Location getLastKnownLocation(/* String provider */);

	// DELEGATES
	public abstract Location getLastKnownLocation(String provider);

	public abstract boolean addGpsStatusListener(Listener listener);

	public abstract boolean addNmeaListener(NmeaListener listener);

	public abstract void addProximityAlert(double latitude, double longitude,
			float radius, long expiration, PendingIntent intent);

	public abstract void addTestProvider(String name, boolean requiresNetwork,
			boolean requiresSatellite, boolean requiresCell,
			boolean hasMonetaryCost, boolean supportsAltitude,
			boolean supportsSpeed, boolean supportsBearing,
			int powerRequirement, int accuracy);

	public abstract void clearTestProviderEnabled(String provider);

	public abstract void clearTestProviderLocation(String provider);

	public abstract void clearTestProviderStatus(String provider);

	public abstract boolean equals(Object o);

	public abstract List<String> getAllProviders();

	public abstract String getBestProvider(Criteria criteria,
			boolean enabledOnly);

	public abstract GpsStatus getGpsStatus(GpsStatus status);

	public abstract LocationProvider getProvider(String name);

	public abstract List<String> getProviders(boolean enabledOnly);

	public abstract List<String> getProviders(Criteria criteria,
			boolean enabledOnly);

	public abstract int hashCode();

	public abstract boolean isProviderEnabled(String provider);

	public abstract void removeGpsStatusListener(Listener listener);

	public abstract void removeNmeaListener(NmeaListener listener);

	public abstract void removeProximityAlert(PendingIntent intent);

	public abstract void removeTestProvider(String provider);

	public abstract void removeUpdates(LocationListener listener);

	public abstract void removeUpdates(PendingIntent intent);

	public abstract void requestLocationUpdates(String provider, long minTime,
			float minDistance, LocationListener listener, Looper looper);

	public abstract void requestLocationUpdates(String provider, long minTime,
			float minDistance, LocationListener listener);

	public abstract void requestLocationUpdates(String provider, long minTime,
			float minDistance, PendingIntent intent);

	public abstract boolean sendExtraCommand(String provider, String command,
			Bundle extras);

	public abstract void setTestProviderEnabled(String provider, boolean enabled);

	public abstract void setTestProviderLocation(String provider, Location loc);

	public abstract void setTestProviderStatus(String provider, int status,
			Bundle extras, long updateTime);

	public abstract String toString();

}